package net.jonbuck.tassoo.eventmanager.exception;

/**
 * <p>
 * <b> Signals that a listener has registered for an event that it cannot
 * support. </b>
 * </p>
 * 
 * @since 1.0.0
 */
public final class UnsupportedListenerException extends RuntimeException {

    /** The error code associated with the exception. */
    private String code;

    /**
     * <p>
     * <b> Creates a new exception using the values passed in. </b>
     * </p>
     * 
     * @param codeValue
     *            the error code
     * @param descriptionValue
     *            the error description
     */
    public UnsupportedListenerException(final String codeValue, final String descriptionValue) {
        super(descriptionValue);
        this.code = codeValue;
    }

    /**
     * @return the code
     */
    public String getCode() {
        return this.code;
    }

    /**
     * @param codeValue
     *            the code to set
     */
    public void setCode(final String codeValue) {
        this.code = codeValue;
    }

}
